<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>类型信息表</title>
	<link rel="stylesheet" type="text/css" href="css/style.css">
    <script src="js/sorttable.js"></script>
  </head>
  
  <body>
  <%Dlyh dl=(Dlyh)request.getSession().getAttribute("dlyh"); %>
  <div style="margin-left: 15%">
   <%//if((dl.getZd().getTypename().endsWith("县")||dl.getZd().getTypename().endsWith("区")||dl.getZd().getTypename().equals("武安市"))&&!dl.getZd().getTypename().equals("工业园区")){ %>
     <input type="button" name="add" id="add" value="添加数据" onClick="location='zd_add.jsp'" title="添加类型">
     <%//} %>
  </div>
      <div style="display: none;" id="PageHeader" class="PageHeader"></div>
<table class="TableTop" width="70%" align="center">
   <tbody><tr>
      <td class="left"></td>
      <td class="center subject">类型信息表 <span style="padding-left: 5px">共${fn:length(list) }条</span></td>
      <td class="right"></td>
   </tr>
</tbody></table>
<pg:pager url="zd.do" index="half-full" maxPageItems="15"
			maxIndexPages="10" isOffset="<%=false%>"
			export="pageOffset,currentPageNumber=pageNumber" scope="request">
		
<table width="70%" id="table1" align="center" border="0" cellspacing="0" cellpadding="0" class="sortable TableBlock no-top-border">
<thead>
  <tr class="title_text">
    <td align="center" class="TableData" >类型</td>
    <td align="center" class="TableData" >类型分类</td>
    <td align="center" class="sorttable_nosort TableData">操作</td>
  </tr>
</thead>
  <TBODY > 
  <c:forEach var="zd" items="${list}">
 <pg:item>
  <tr>
    <td align="center" class="TableData">${zd.typenames}</td>
    <td align="center" class="TableData">
      ${zd.typename}</td>
      
    <td align="center" class="TableData">
    <%if((dl.getZd().getTypename().endsWith("县")||dl.getZd().getTypename().endsWith("区")||dl.getZd().getTypename().equals("武安市"))&&!dl.getZd().getTypename().equals("工业园区")){ %>
    <a href="zd.do?state=edit&id=${zd.id }">编辑</a>
    <%} else{%>
      编辑
    <%} %>
    </td>
    </tr>
    </pg:item>
  </c:forEach>
 </TBODY>
</table>
<pg:index>
				<center>
					<table border=0 cellpadding="5" cellspacing=0" style="font-size: 12px">
						<tr align="center" valign="top">
							<td valign="bottom"><br /></td>
							<pg:prev ifnull="true">
								<%
									if (pageUrl != null) {
								%>
                                <td align=right>
                                   
									<A HREF="<%=pageUrl%>&state=showlist&pageNo=<%=pageNumber%>">上一页<br />
									</A>
								</td>
								<%
									} else {
								%>
								<td>
									上一页
								</td>
								<%
									}
								%>
							</pg:prev>
							<pg:pages>
								<%
									if (pageNumber == currentPageNumber) {
								%>
								<td>
									<font color=#A90A08><%=pageNumber%></font>
								</td>
								<%
									} else {
								%>
								<td>
									<A HREF="<%=pageUrl%>&state=showlist&pageNo=<%=pageNumber%>"> <%=pageNumber%></A>
								</td>
								<%
									}
								%>
							</pg:pages>
							<pg:next ifnull="true">
								<%
									if (pageUrl!= null) {
								%>
								<td>
									<A HREF="<%=pageUrl%>&state=showlist&pageNo=<%=pageNumber%>">下一页<br /></A>
								</td>
								<%
									} else {
								%>
								<td>
									下一页
								</td>
								<%
									}
								%>
							</pg:next>
						</tr>
					</table>
				</center>
			</pg:index>

		</pg:pager>
  </body>
</html>
